Test Case Generation as an AI Planning
نویسنده
چکیده
While Artiicial Intelligence techniques have been applied to a variety of software engineering applications, the area of automated software testing remains largely unexplored. Yet, test cases for certain types of systems (e.g., those with command language interfaces and transaction based systems) are similar to plans. We have exploited this similarity by constructing an automated test case generator with an AI planning system at its core. We compared the func-tionality and output of two systems, one based on Software Engineering techniques and the other on planning, for a real application: the StorageTek robot tape library command language. From this, we showed that AI planning is a viable technique for test case generation and that the two approaches are complementary in their capabilities. 1. Automated Test Case Generation Testing consumes a large amount of time and eeort in software development. Although critical for ensuring reliability and satisfaction, much of the process is tedious: constructing data sets and/or sequences of commands to probe for faults. Some of the test cases will uncover faults, but one expects that most will not. A variety of approaches have been put forth for automated test generation in Software Engineering (SE) (see section 2). Another approach is to acknowledge a similarity between some types of test cases (i.e., sequences of commands for software with command language interfaces) and plans in Artiicial Intelligence (AI). Both are sequences of commands to achieve some goal; both need to conform to syntactic requirements of the commands and the semantic interactions between commands. Considerable research in AI planning has addressed subgoal and operator interactions; thus, the mechanisms of planning seem ideally suited to test case generation. In this paper, we explore the similarities between test case and plan generation, propose another approach, as implemented in a prototype, to automated test case generation using an AI planner and compare the new approach to an existing SE approach.
منابع مشابه
Test Case Generation for Visual Contracts Using AI Planning
In this paper, we propose a novel approach for computing test case preambles using visual contracts and AI Planning. In unit testing, preambles are required for setting the class under test into a controlled state (prestate). The class operation can then be invoked with test inputs. In previous research, we have used model checking for computing preambles. In this paper, we show how preamble co...
متن کاملHierarchical GUI Test Case Generation Using Automated Planning
ÐThe widespread use of GUIs for interacting with software is leading to the construction of more and more complex GUIs. With the growing complexity come challenges in testing the correctness of a GUI and its underlying software. We present a new technique to automatically generate test cases for GUIs that exploits planning, a well-developed and used technique in artificial intelligence. Given a...
متن کاملGenerating Goal-Oriented Test Cases
This paper describes an AI planner assisted approach to generate test cases for system testing based on high level test objectives. Test generation is based on an extended UML model of the system under test and a mapping of high-level test objectives into initial and goal conditions of the planner. We illustrate the use of this approach on a series of high level test objectives one might apply ...
متن کاملOptimization of Mixed-Integer Non-Linear Electricity Generation Expansion Planning Problem Based on Newly Improved Gravitational Search Algorithm
Electricity demand is forecasted to double in 2035, and it is vital to address the economicsof electrical energy generation for planning purposes. This study aims to examine the applicability ofGravitational Search Algorithm (GSA) and the newly improved GSA (IGSA) for optimization of themixed-integer non-linear electricity generation expansion planning (GEP) problem. The performanceindex of GEP...
متن کاملPlanning in AI and Text Planning in Natural Language Generation
Researchers in natural language generation are becoming increasingly aware of the similarities between the task of planning the content and structure of the natural language text and that of other AI planning tasks. The problem of text planning and other AI planning problems have been studied separately from each other, and while many overlapping results have been found, they have not been shar...
متن کامل